/*
* Copyright 2016 Yonyou Auto Information Technology（Shanghai） Co., Ltd. All Rights Reserved.
*
* This software is published under the terms of the YONYOU Software
* License version 1.0, a copy of which has been included with this
* distribution in the LICENSE.txt file.
*
* @Project Name : marketing-wechat-open-api
*
* @File name : VehicleBindingApServiceInterface.java
*
* @Author : LiuJun
*
* @Date : 2016年12月5日
*
----------------------------------------------------------------------------------
*     Date       Who       Version     Comments
* 1. 2016年12月5日    LiuJun    1.0
*
*
*
*
----------------------------------------------------------------------------------
*/

package com.yonyou.gmcc.gateway.wechat.service.interfaces;

import java.util.Map;

import org.marketing.common.dto.customerInfo.CarInfoDto;
import org.marketing.common.dto.customerInfo.VehicleBindingParamDto;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 *
 * @author LiuJun 车辆绑定API接口
 * @date 2016年12月5日
 */
@FeignClient(name = "service-customerInfo")
public interface VehicleBindingApServiceInterface {

	/**
	 *
	 * @author LiuJun 判断潜客和车主是否绑定
	 * @date 2016年12月5日
	 * @param potentialUserId
	 * @param phone
	 * @return
	 * @throws Exception
	 */
	@RequestMapping(value = "/vehicleBinding/api/v1/whetherBinding", method = RequestMethod.GET, produces = "application/json;charset=UTF-8")
	public @ResponseBody Map<String, Object> judgeVehicleWhetherBinding(
			@RequestParam("potentialUserId") Long potentialUserId, @RequestParam("phone") String phone);

	/**
	 *
	 * @author LiuJun 潜客和车主绑定
	 * @date 2016年12月5日
	 * @param vehicleBindingParamDto
	 * @return
	 * @throws Exception
	 */
	@RequestMapping(value = "/vehicleBinding/api/v1", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
	public @ResponseBody Map<String, Object> vehicleBindingHandle(
			@RequestBody VehicleBindingParamDto vehicleBindingParamDto);

	/**
	 * 更新车辆信息
	 * 
	 * @author QianKun
	 * @date 2017年1月12日
	 * @param carInfoDto
	 * @return
	 */
	@RequestMapping(value = "/vehicleBinding/api/v1/updateCarInfo", method = RequestMethod.POST)
	@ResponseBody
	public Map<String, Object> updateCarInfo(@RequestBody CarInfoDto carInfoDto);

	/**
	 * 解除车主车辆绑定
	 * 
	 * @author QianKun
	 * @date 2017年1月12日
	 * @param carInfoDto
	 * @return
	 */
	@RequestMapping(value = "/vehicleBinding/api/v1/updateOwnerCar", method = RequestMethod.POST)
	@ResponseBody
	public Map<String, Object> updateOwnerCar(@RequestBody CarInfoDto carInfoDto);

}
